convert matlab code to python